package com.dyh.service.blog;

import com.dyh.dao.BlogDao;
import com.dyh.pojo.Blog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogServiceImpl implements BlogService{

    @Autowired
    private BlogDao blogDao;

    @Override
    public void addBlog(Blog blog) {
        blogDao.addBlog(blog);
    }

    @Override
    public void updateBlog(Blog blog) {
        blogDao.updateBlog(blog);
    }

    @Override
    public void deleteBlog(int id) {
        blogDao.deleteBlog(id);
    }

    @Override
    public List<Blog> queryBlogList() {
        return blogDao.queryBlogList();
    }

    @Override
    public Blog queryBlogById(int id) {
        return blogDao.queryBlogById(id);
    }
}
